<template>
	<view class="app">
		<view class="panel">
			<view class="flex-col setpidpage">
				<view class="flex justify-between inputitem">
					<view>订单号</view>
					<view><input v-model="order_sn" placeholder="请输入订单号" /></view>
				</view>
				<view class="flex justify-center items-center btn-save">
					<button @tap.stop="save">立即补单</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	var that,App=getApp(),Comm=getApp().comm;
	export default {
		data() {
			return {
				order_sn:'',
			}
		},
		onLoad() {
			that=this;
		},
		methods: {
			save(){
				if(!/^O\d{18}$/.test(this.order_sn)){
					uni.showToast({icon:'none',title:'订单号有误'});
					return;
				}
				this.comm.http('/api/service/notify',{ordid:this.order_sn}).then(res=>{
					uni.showToast({icon:'none',title:res.msg});
				});
			}
		}
	}
</script>

<style lang="scss">
	.setpidpage{
		.inputitem{
			align-items: center;
			view:nth-child(2){
				flex: 1;margin-left: 8px;
				input{
					height:40px; width: 100%; border-bottom: 1px solid #f0f0f0; font-size: 13px;
				
				}
			}

		}
		.tips{
			font-size: 12px; color: #999; padding: 8px 0; display: block;
		}
	}
</style>
